package com.vimi8.ebb.api.demo;

import com.vimi8.ebb.configuration.HttpResponseEntity;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * Created by think on 2016/12/5.
 */
@RestController
@RequestMapping("/gis")
public class DemotestController
{

    @ApiOperation(value = "用户相关信息",notes = "获取当前登录用户信息",response = String.class,tags = {"测试用户信息"})
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回影响行数", response = String.class),
            @ApiResponse(code = 500, message = "失败,返回消息", response = String.class) })
    @RequestMapping(value = "/test",method = RequestMethod.GET)
    public HttpResponseEntity<String> getTestData(@ApiParam(value = "测试数据id",required = false) @RequestParam(required = false) String name){

        return new HttpResponseEntity<String>("欢迎你，"+name,HttpStatus.OK);
    }
}
